package mc;

public class Rock implements Block {
    String picUrl;
    int hardness;

    public Rock(String picUrl, int hardness) {
        this.picUrl = picUrl;
        this.hardness = hardness;
    }

    @Override
    public void putDown() {
        System.out.printf("放置岩石(picUrl=%s,hardness=%d)%n", picUrl, hardness);
    }

    @Override
    public Block createClone() {
        Block block = null;
        try {
            block = (Block) clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return block;
    }
}
